package com.hnguigu.health.houduan.lq.service_lq.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hnguigu.health.houduan.lq.service_lq.TMentalityResultService;
import com.hnguigu.health.mapper.TMentalityResultMapper;
import com.hnguigu.health.pojo.TMentalityResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TMentalityResultServiceImpl implements TMentalityResultService {
    @Autowired(required = false)
    TMentalityResultMapper tMentalityResultMapper;

    @Override
    public int deleteBytermer(String termer) {
        return tMentalityResultMapper.deleteBytermer(termer);
    }

    @Override
    public int updateByPrimaryKeySelective(TMentalityResult record) {
        return tMentalityResultMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public TMentalityResult selectBytmerber(String tmerber) {
        return tMentalityResultMapper.selectBytmerber(tmerber);
    }

    @Override
    public int insertSelective(TMentalityResult record) {
        return tMentalityResultMapper.insertSelective(record);
    }

    @Override
    public PageInfo<TMentalityResult> selectAllTmenResult(String content, int page, int num) {
        PageHelper.startPage(page,num);
        return new PageInfo<>(tMentalityResultMapper.selectAllTmenResult(content));
    }
}
